import ajax from './axios'

export default class api extends ajax {
    getAction(url,data){
        return this.get(url, data)
    }
    postAction(url,data,config){
        return this.post(url, data,config)
    }
    login(data){
        return this.post('/auth/login', data)
    }
    getPerson(data){
        return this.post('/personalInfo/queryRows', data)
    }
    getUser(data){
        return this.post('/user/queryRows', data)
    }
    loginOut(data){
        return this.post('/auth/loginOut', data)
    }
    getNoticeList(data) {
        return this.get('/notice/list', data)
    }
    addNotice(data) {
        return this.post('/notice/add', data)
    }
    removeNotice(data) {
        return this.post('/notice/remove', data)
    }
    modifyNotice(data) {
        return this.post('/notice/modify', data)
    }
    getNoticeDetail(data) {
        return this.get('/notice/detail', data)
    }
    //添加弹窗广告图片
    addAdvImg(data) {
        return this.post('/popup-ads/image-add', data)
    }
    // 删除已上传的图片
    deleteUploadedImg(data) {
        return this.get('/popup-ads/image-remove', data)
    }
    // 获取广告列表
    getAdvList(data) {
        return this.get('/popup-ads/list', data)
    }
    //添加弹窗广告
    addAdvertisement(data) {
        return this.post('/popup-ads/add', data)
    }
    //修改弹窗广告
    modifyAdvertisement(data) {
        return this.post('/popup-ads/modify', data)
    }
    //弹窗广告详情
    getAdvDes(data){
        return this.get('/popup-ads/detail', data)
    }
    //删除弹窗广告
    removeAdvertisement(data) {
        return this.get('/popup-ads/remove', data)
    }
    //获取6个精选品牌
    getSixBrands() {
        return this.get('/choice-brand/list')
    }
    //获取所有品牌
    getAllBrand(data) {
        return this.get('/brand/list', data)
    }
    //添加精选品牌
    addJxBrand(data) {
        return this.post('/choice-brand/add', data)
    }
    //编辑品牌
    modifyBrand(data) {
        return this.post('/brand/modify', data)
    }
    // 精选品牌修改
    updateJxBrand(data) {
        return this.post('/choice-brand/modify', data)
    }
    // 删除精选品牌
    removeJxBrand(data) {
        return this.get('/choice-brand/remove', data)
    }
    //搜索词列表
    getSearchKeys() {
        return this.get('/search-key/list')
    }
    // 添加搜索关键词
    addSearchKey(data) {
        return this.post('/search-key/add', data)
    }
    // 修改搜索关键词
    modifySearchKey(data) {
        return this.post('/search-key/modify', data)
    }
    //删除搜索词
    removeSearchKey(data) {
        return this.get('/search-key/remove', data)
    }
    //售后列表
    getApplicationList(data) {
        return this.get('/aftersale/list', data)
    }
    // 用于导出数据的接口
    getApplicationDesList(data) {
        return this.get('/aftersale/detail-list', data)
    }
    //售后详情
    checkoutApplicationDes(data) {
        return this.get('/aftersale/detail', data)
    }
    // 页面详情
    getPageDes(data) {
        return this.get('/page/show', data)
    }
    modifyPage(data) {
        return this.post('/page/modify', data)
    }
    //根据sku获取产品信息
    getPruductInfoBySku(data) {
        return this.get('/promotion/sku-search', data)
    }
    //获取促销列表
    getPromotionList(data) {
        return this.get('/promotion/list', data)
    }
    // 添加促销
    addPromotion(data) {
        return this.post('/promotion/add', data)
    }
    // 删除促销
    removePromotion(data) {
        return this.get('/promotion/remove', data)
    }
    // 添加促销商品
    addProductForPromotion(data) {
        return this.post('/promotion/pro-add', data)
    }
    // 获取促销详情
    getPromotionDes(data) {
        return this.get('promotion/detail', data)
    }
    // 启用停用促销
    changePromotionStatus(data) {
        return this.post('promotion/set-status', data)
    }
    // 删除促销商品
    deeleteProductFromPromotion(data) {
        return this.post('/promotion/pro-remove', data)
    }
    // 修改促销信息
    modifyPromotion(data) {
        return this.post('/promotion/modify', data)
    }
    checkStatus(data) {
        return this.get('/promotion-banner/status', data)
    }
    //获得专区列表
    getZoneList() {
        return this.get('/promotion-banner/list')
    }
    //修改专区banner
    modifyZone() {
        return this.post('/promotion-banner/modify', data)
    }
    //批量修改促销banner状态
    modifyStatus(data) {
        return this.post('/promotion-banner/set-status', data)
    }
    
}